// pages/home/home.js
Page({

  data: {
    background: ['../../images/6922-kpamyih6556786.jpg', '../../images/16141593658869228.jpg', '../../images/d6d56c9cfe89d4d627ebdfd82f9b1297.jpg'],
    indicatorDots: true,
    vertical: false,
    autoplay: false,
    interval: 2000,
    duration: 500,
    buttons: [{text: '取消'}, {text: '确认'}],
    extClass: 'test',
    content: '1',
    imgUrls:['images/我的.png']
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  onShareAppMessage() {
    return {
      title: 'swiper',
      path: 'page/component/pages/swiper/swiper'
    }
  },

  toSecondPage:function (e) {
    let pages=e.currentTarget.dataset.page
    wx.navigateTo({
      url: `${pages}/${pages}`,
      events: {
        acceptDataFromOpenedPage: function(data) {
          console.log(data)
        },
        someEvent: function(data) {
          console.log(data)
        }
    
      },
      success: function(res) {
        res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
      },
      fail:function (res) { 
        console.log(res)
      }
    })
  }

})